package com.xingfly.model;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 用户权限  一个角色拥有多个权限 （权限->角色）一对多
 * Created by SuperS on 2016/11/30.
 */
@Entity
@Table(name = "xf_permission")
public class Permission extends BaseModel {
    private String permissionName;
    @ManyToOne
    @JoinColumn(name = "role_id")
    private Role role;// 一个权限对应一个角色

    public String getPermissionName() {
        return permissionName;
    }

    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }
}
